Skip to content

refactor(datepicker): avoid frequent template expressions re-evaluati…#1806

Merged
chintankavathia merged 1 commit intomainfrom
refactor/calendar-body-cache
Apr 9, 2026
Merged

refactor(datepicker): avoid frequent template expressions re-evaluati…#1806
chintankavathia merged 1 commit intomainfrom
refactor/calendar-body-cache

Conversation

@spliffone
Copy link
Copy Markdown
Member

@spliffone spliffone commented Apr 2, 2026

@spliffone spliffone requested review from a team as code owners April 2, 2026 08:50
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the calendar body to use a computed signal for managing cell range CSS classes, replacing multiple individual class bindings in the template. A performance concern was raised regarding the cellRangeClasses signal, which currently triggers re-calculations on every mouse movement because it unconditionally depends on the activeHover signal. It is recommended to read the hover signal conditionally to avoid unnecessary updates when range selection or previews are disabled.

@spliffone spliffone added this to the 49.x milestone Apr 6, 2026
@spliffone spliffone force-pushed the refactor/calendar-body-cache branch 2 times, most recently from 7b54faa to 8b19335 Compare April 6, 2026 19:56
@spliffone spliffone added the enhancement Topics that make the project better label Apr 7, 2026
Comment thread projects/element-ng/datepicker/components/si-calendar-body.component.ts Outdated
@spliffone spliffone force-pushed the refactor/calendar-body-cache branch from 8b19335 to 66bc0b9 Compare April 8, 2026 12:56
@chintankavathia chintankavathia added this pull request to the merge queue Apr 9, 2026
Merged via the queue into main with commit 882f9e2 Apr 9, 2026
11 checks passed
@chintankavathia chintankavathia deleted the refactor/calendar-body-cache branch April 9, 2026 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Topics that make the project better

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants